The following disclosure relates to computer graphics. More specifically, the following relates to techniques for invising objects in computer animation.
In computer graphics imagery, secondary objects, such as hair, clothing, and plants are often too complex for an animator to directly control at every stage of a computer animation. Instead, the animator typically specifies the physics and/or physical properties of these secondary or dynamic objects. A computer program then simulates the motions and positions of the secondary objects over time. Often physically-based numerical methods and techniques are used to simulate the secondary or dynamic objects based on the physics and/or physical properties of the individual secondary objects.
In general, for simulated hair or fur objects, the animator specifies the physical properties and construction of the hair or fur. For example, the animator may specify how the hair bends or flexes due to forces or collisions with solid objects. The animator may further specify how the hair deforms or collides with itself. Moreover, the animator may specify external forces that act on the hair, such as gravity and wind.
In addition to modeling the physical properties of secondary or dynamic objects, the animator may specify motions and/or positions of kinematic or non-simulated objects (e.g., characters upon which clothing objects rest). The animation of a non-simulated object generally is independent of and otherwise unaffected by motions and positions of simulated objects. However, the motions and positions of the non-simulated objects often are the principal influencer of motions and positions of simulated objects, such as the clothing and hair likely to be associated with a kinematic character.
In general, computer animation of characters with hair or fur typically requires producing models containing hundreds of thousands, to millions of strands of hair. One challenge is to ensure that at every frame of the animation, the position of the hairs avoid intersections.
Typically, there are two basic approaches for eliminating intersections between objects. In one approach, the geometry of one object is changed to avoid intersections. For example, a single hair object being simulated may be bent around another object rather than simply passing through the other object. However, when there are hundreds of thousands to millions of objects, changing the geometry of each of the objects becomes prohibitive.
Another approach involves refraining from drawing or rendering an object when an intersection occurs. This approach may be called “invising.” Typically, detecting when an object intersects with another object at any given frame of an animation is not particularly challenging. However, one challenge is the determination whether to “invis” (i.e., refrain from rendering or drawing) the intersecting object such that the resulting animation appears coherent over time.
Consider an example of an animal character object. The animal character is covered in hair (or fur). Hairs on the animal character which only graze another portion of the character (e.g., a paw or digit) may change their state from visible to invisible with only minor changes in situation geometry. This typically causes two problems. The first typically occurs if the situation geometry is changing slowly but smoothly, for example, when one or more digits of the animal character move slowly across to a patch of the hair on the torso of the character. As the digits move slowly relative to the patch of hair, the abrupt change from visible to invisible, or vice versa, of hairs in the patch could cause a subtle yet apparent annoying visual artifact.
The second problem typically is exhibited the closer hairs on the animal character come to just grazing another portion of the character. In this scenario, subject even the slightest changes in the situation geometry the hairs transition from visible to invisible and back. In one example, small chest expansions of the torso of the character due to the character's breathing will cause the hairs on the torso just grazing a paw or digit of the character to shift ever so slightly with respect to the paw or digit. As a result, grazing hairs may continually change from visible to invisible, all without much detectable change of the underlying torso or paw geometry. This typically manifests itself as hairs that change visibility state for seemingly no reason at all.
One solution is to introduce coherence by maintaining a history of an object's visibility state. For example, if a hair is only just grazing a paw or digit associated with the animal character, and it has been determined that the hair still should be visible in one frame, if the hair just grazes the paw or digit in the next frame, the same decision could be applied to the hair in the next frame. This generally avoids the problem of hairs flickering on and off for no (apparent) reason, but still does not solve the problem of abrupt transitions when a hair is finally deemed to have intersected strongly enough for a requirement that the hair be made invisible. Furthermore, this approach adds an extremely serious restriction. The approach requires one to render frames in order, from first to last, to maintain a history of each hair's visibility state over time.
This is an unacceptable requirement, because most modern production environments depend on being able to distribute the rendering of a sequence of frames over many computers. For example, in a 100 frame sequence, it is typical for each frame to be rendered by a separate computer approximately during the same time. This requires that the computations for each frame be independent of all other frames. However, by requiring that the visibility of a hair at frame n be depend on the hair's visibility at frame n−1, a dependency is introduced such that the frames are required to be rendered sequentially, rather than the computations been performed in parallel.
Accordingly, what is desired are improved methods and apparatus for solving some of the problems discussed above, while reducing further drawbacks, some of which are discussed above.